Carbon


FillPoly

Header: Quickdraw.h Carbon status: Supported

Fills a polygon with any available bit pattern.

void FillPoly (
    PolyHandle poly, 
    const Pattern *pat
);
Parameter descriptions
poly

A handle to the polygon to fill. The OpenPoly function returns this handle when you first create the polygon.

pat

The bit pattern to use for the fill.

DISCUSSION

Using the patCopy pattern mode, the FillPoly function draws the interior of the polygon whose handle you pass in the poly parameter with the pattern defined in the Pattern structure that you specify in the pat parameter.

This function leaves the location of the graphics pen unchanged.

This function temporarily converts the polygon into a region to perform their operations. The amount of memory required for this temporary region may be far greater than the amount required by the polygon alone.

You can estimate the size of this region by scaling down the polygon with the MapPoly, converting the polygon into a region, checking the region’s size with the Memory Manager function GetHandleSize, and multiplying that value by the factor by which you scaled the polygon.

The result of this graphics operation is undefined whenever any horizontal or vertical line drawn through the polygon would intersect the polygon’s outline more than 50 times.

Use GetPattern and GetIndPattern to get a pattern stored in a resource.

Use PaintPoly to draw the interior of a polygon with the pen pattern for the current graphics port. To fill a polygon with a pixel pattern, use the FillCPoly function.

SPECIAL CONSIDERATIONS

The FillPoly function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)